<link rel="stylesheet" href="__STATIC__mobile/css/cart.css">
<link rel="stylesheet" href="__STATIC__mobile/css/buy.css">
<link rel="stylesheet" href="__STATIC__mobile/css/addressManage.css">
<script src="__STATIC__mobile/js/areadata.js"></script>
<script src="__STATIC__mobile/js/myarea.js"></script>
<script src="__STATIC__mobile/js/expressdata.js?5555"></script>
<style>

.youhui{
	position: absolute;
    right: 6px;
	width:100px;
	height:22px;
	display:block;
}
.pad50{
    padding-bottom: 200px
}
</style>
<style>

.mgt40{
	margin-top:40px;
}
.mcart_pay{
	bottom:51px;
	positon:absolute;
}
.heji {
    max-width: 140px;
    overflow: hidden;
    position: absolute;
    right: 160px;
    bottom: 0px;
}
.mcart_pay .mcart_pay_ri {
    position: absolute;
    height:100%;
	width:100%;
}

.mcart_pay .mcart_pay_ri a {
    float: left;
    display: inline-block;
    padding: 0 16px;
    background: #ff5000;
    font-size: 16px;
    color: #fff;
    margin-left: 6px;
    position: absolute;
    bottom: 0px;
    right: 0px;
}
   <?php if(!$is_mobile){  ?>

.mcart_tit{
    position:absolute;
}
.mcart_pay {
    height: 50px;
    line-height: 50px;
    overflow: hidden;
    border: #ededed solid 1px;
    border-width: 1px 0;
    background: #fff;
    position: fixed;
    bottom: 0px;
    left: 0;
    width: 100%;
    z-index: 1;
    width:25%;
    margin:0 auto;
    right:0;
    left:0;
}
.nav{
    position:fixed;
    width:25%;

}

        <?php } ?>

</style>

       
<div class="membersbox pad50">
<section class="mcart_tit"><span>订单页面<i class="j-totalNum" style="display:none;">1</i></span>
   <!--<b class="del-item" id="delall">清空</b>-->
</section>
<form action="/mobile/orderadd" method="post" id="form" class="mgt40">
    <section class="fixinline pdl10">
    <span style="color:red;">*</span>请选择合伙人身份:
    <select id="identity">
        <option>---请选择合伙人身份-----</option>
        <option value="1">合伙人</option>
        <option value="2">城市合伙人</option>
        <option value="3">公司合伙人</option>
    </select>
    </section>
    <!--
        <section class="textarea_content clearfix">
            <section class="content-name fl"></section>
            <section class="content-textarea fl">
                <select id="province" name="province" style="width:200px;"></select>
            </section>
        </section>

    </div>
    -->
<section class="mcart_goods">
        <ul>
                <?php foreach($goods_info as $key=>$goods){ ?>
                 <li class="g-box">
                    <section class="mcart_goods_img">
                        <a href="javascript:void(0);">
                            <img src="<?php echo C('UPYUN_DOMAIN').$goods['goods_pic'];?>!headimgurl" width="80" height="80"  onerror="javascript:this.src='__STATIC__mobile/images/goods.jpg';">                   
                        </a><b></b>
                        <label class="btn-check J-inp">
                            <em class="cur"></em>
                        </label>
                        <input type="checkbox" name="checkbox[]" value="<?php echo $goods['goods_id'];?>"  >
                    </section>
                    <section class="mcart_goods_infor g-flex clearfix">
                        <section class="mcart_goods_title">
                            <a href="javascript:void(0);"><?php echo $goods['goods_name'];?></a>
                            <p style="color:#333;"><?php echo $goods['guige_name_new'];?></p>
                            
                            <?php if($goods['double_buy']>1){?>
                                <em class="beishu"><?php echo $goods['double_buy'];?><?php echo $goods['unit'] ? $goods['unit'] : '件';?>起订</em>
                            <?php } ?>
                            
                        </section>
                        <section class="num">
                            
                            <?php if($goods['gtype_id']==9) { ?>
                                
                            <i>
                                
                                <span class="integer">0</span>  
                                <span class="decimal font12">00</span>
                                <span style="font-size:10px">积分</span>
                                <span class="nums" style="display: none;"><?php echo $goods['shop_price'];?></span> 
                            </i>
                                <?php }else{ ?>
                                <i>
                                    <span style="font-size:10px">￥</span>
                                    <span class="integer">0</span>  
                                    <span class="decimal font12">00</span>
                                    <span class="nums" style="display: none;"><?php echo $goods['shop_price'];?></span> 
                                </i>
                                <del><span style="font-size:10px">￥</span><?php echo $goods['market_price'];?></del>
                            
                                <?php } ?>
                                
                                
                            
                            <span>
                                <i class="edd">-</i>
                                <input type="tel" data-id="<?php echo $goods['goods_id'];?>" class="j-rcNum appearance"    max_buy="<?php echo $goods['max_buy'] ? $goods['max_buy'] : 0;?>" min_buy="<?php echo $goods['min_buy'] ? $goods['min_buy'] : 1;?>" double_buy="<?php echo $goods['double_buy'] ? $goods['double_buy'] : 1;?>" value="<?php echo $goods['min_buy'] ? $goods['min_buy'] : ($goods['num']?$goods['num']:1);?>">
                                <i class="add">+</i>
                                <input type="hidden" class="j-rcPrice" value="<?php echo $goods['shop_price'];?>">
                                <input type="hidden" class="j-rcDiscount" value="<?php echo 1;?>">
                                <input type="hidden" class="goods_weight" value="<?php echo $goods['goods_weight'];?>">
                                <input type="hidden" class="is_brand" value="<?php echo $goods['is_brand'];?>">
                                <input type="hidden" name="num">                                
                                <input type="hidden" class="j-rcScore" value="<?php echo $goods['score_rate'];?>">
                                <input type="hidden" name="sku_id[]" value="0">
                                <input type="hidden" name="guige_id[]" value="<?php echo $goods['guige_id'];?>">
                                 <input type="hidden" name="guige_id_new[]" value="<?php echo $goods['guige_id_new'];?>">
                                <input type="hidden" name="guige_name_new[]" value="<?php echo $goods['guige_name_new'];?>">
                                <input type="hidden" class="j-rcShiwu" value="<?php echo $goods['is_shiwu'];?>">
                                <input type="hidden" class="grade1_price" value="<?php echo $goods['grade1_price'];?>">
                                <input type="hidden" class="grade2_price" value="<?php echo $goods['grade2_price'];?>">
                                <input type="hidden" class="grade3_price" value="<?php echo $goods['grade3_price'];?>">
                                <input type="hidden" class="grade4_price" value="<?php echo $goods['grade4_price'];?>">
                                <input type="hidden" class="grade5_price" value="<?php echo $goods['grade5_price'];?>">
                                <input type="hidden" class="grade6_price" value="<?php echo $goods['grade6_price'];?>">
                            </span> 
                        </section>
                    </section>
                </li>
                <?php } ?>
                
</ul>
            </section>
<div class="msettlement_goods_con">
    <input type="hidden" name="pay_password" id="pay_password">
                <section class="fixinline pdl10">
                        <section class="textarea_content clearfix">
                                <section class="content-name fl"><span style="color:red;">*</span><span id="shouhuoren"><?php echo $is_idcard ? "姓名" : "收货人"; ?></span>:</section>
                                <section class="content-input fl">
                                    <input class="text" maxlength="5" value="<?=$delivery['delivery_name']?>" name="delivery_name" id="delivery_name" placeholder="必填，收货人真实姓名">
                                </section>
                        </section>
                </section>
                <section class="fixinline pdl10">
                        <section class="textarea_content clearfix">
                                <section class="content-name fl"><span style="color:red;">*</span>手机号:</section>
                                <section class="content-input fl">
                                        <input type="tel" class="text" maxlength="11" value="<?=$delivery['delivery_mobile']?>" name="delivery_mobile"  id="delivery_mobile" placeholder="必填，收货人电话号码">
                                </section>
                        </section>
                </section>
				
          
				<?php if($is_shiwu){ ?>
				
				<input type="hidden" value="<?php echo $delivery['province_id'];?>" name="province_id" id="province_id">
                                
                                <input type="hidden" value="<?php echo $delivery['city_id'];?>" name="city_id" id="city_id">
                                <input type="hidden" value="<?php echo $delivery['county_id'];?>" name="county_id" id="county_id">

				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl"><span style="color:red;">*</span>省份:</section>
						<section class="content-textarea fl">
							<select id="province" name="province" style="width:200px;"></select>
						</section>
					</section>
				</section>
				
				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl"><span style="color:red;">*</span>城市:</section>
						<section class="content-textarea fl">
							<select id="city" name="city" style="width:200px;"></select>
						</section>
					</section>
				</section>
				
				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl"><span style="color:red;">*</span>区域:</section>
						<section class="content-textarea fl">
							<select id="county" name="county" style="width:200px;"></select>
						</section>
					</section>
				</section>
				
				
				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl"><span style="color:red;">*</span>详细地址:</section>
						<section class="content-input fl">
							<input class="text" maxlength="60" value="<?php echo $delivery['address'];?>"  name="address" id="address" placeholder="必填，详细地址">
						</section>
					</section>
				</section>
				<?php } ?>
				
				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl"><?php if($is_shiwu == 0){?><span style="color:red;"></span><?php } ?>微信号:</section>
						<section class="content-input fl">
							<input class="text" maxlength="20" value="<?php echo $delivery['wechat_user'];?>"  name="wechat_user" id="wechat_user" placeholder="<?php echo ($is_shiwu == 0)?'选填':'选填'; ?>，您的微信号码">
						</section>
					</section>
				</section>

				<section class="fixinline pdl10" style="display:none;">
					<section class="textarea_content clearfix">
						<section class="content-name fl">发票抬头:</section>
						<section class="content-textarea fl">
							<textarea class="text" name="bill_name" placeholder="如需发票,请填写您的发票抬头"></textarea>
						</section>
					</section>
				</section>
				
				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl">买家留言:</section>
						<section class="content-textarea fl">
							<textarea class="text" name="khnote" placeholder="选填，可填写您和卖家达成一致的要求"></textarea>
						</section>
					</section>
				</section>
				
			</div>
        	
<div class="msettlement_goods_con">

                <section class="post_fee pdl10">
                    <section class="msettlement_tit">
                       	<span>运费:</span>
                        <em class="fr">
                        
                        <span id="yunfei_txt" style="color:#fe6e27;font-size:16px;width:100px;margin-right:15px;"></span>
                        
                        
                        </em>
                    </section>
                </section>
                
               <section class="post_fee pdl10" style="display:none">
                    <section class="msettlement_tit ">
                    	<span style="">当前折扣比例:&nbsp;&nbsp;</span><span style="color:blue;font-weight:bold;font-size:15px" class="jianzhu_zhekou_txt">无</span>
                        <em class="settlement-choice fr"><i class="smallsize"></i>
                        <label class="btn-check youhui">


                        </label>
                        </em>
                    </section>
                </section>

				<?php if($memberinfo['grade_id']>1){ ?>
				<section class="post_fee pdl10" id="zhekou_show" style="display:none;">
                    <section class="msettlement_tit">
                       	<span>会员折扣优惠:</span>
                        <em class=" fr" ><span id="zhekou_txt" style="color:#fe6e27;font-size:16px;width:100px;margin-right:15px;">¥0.00</span></em>
                    </section>
                </section>
                <?php } ?>
                
                
                <?php if($memberinfo['tihuo_money'] >0 && !$is_brand){?>
				<section class="post_fee pdl10">
                    <section class="msettlement_tit">
                       	<span style=""><?php echo C('TIHUO_NAME');?>余额：<?php echo $memberinfo['tihuo_money'];?>元&nbsp;&nbsp;</span><span style="color:blue;font-weight:bold;font-size:15px" class="tihuo_txt use_money"></span>
                        <em class="settlement-choice fr"><i class="smallsize"></i>

						<label class="btn-check youhui">
							<input value="1" type="hidden" id="use_tihuo" name="use_tihuo">
						<em class="cur" id="tihuo_em"></em>
						</label>

						</em>
                        
                    </section>
                </section>
                <?php }else{ ?>
                	<input value="0" type="hidden" id="use_tihuo" name="use_tihuo">
                <?php } ?>

               

				<?php if($memberinfo['score']>0 && !$no_score){?>
				<section class="post_fee pdl10">
                    <section class="msettlement_tit ">
                    	<span style=""><?=C('SCORE_NAME')?>余额：<?=$memberinfo['score']?><?=C('SCORE_NAME')?>&nbsp;&nbsp; </span><span style="color:blue;font-weight:bold;font-size:15px" class="score_txt use_money"></span>
                        <em class="settlement-choice fr"><i class="smallsize"></i>

						<label class="btn-check youhui">
							<input value="1" type="hidden" id="use_score" name="use_score">
						<em class="cur" id="score_em"></em>
						</label>

						</em>
                        
                    </section>
                </section>
                <?php }else{ ?>
                	<input value="0" type="hidden" id="use_score" name="use_score">
                <?php } ?>
                
                
                  
                <!-- 奖励佣金 -->
                <?php if($memberinfo['prize_money']>0){?>
				<section class="post_fee pdl10">
                    <section class="msettlement_tit">
                    	<span style="">奖励佣金余额：<?=$memberinfo['prize_money']?>元&nbsp;&nbsp; </span><span style="color:blue;font-weight:bold;font-size:15px" class="prize_txt use_money"></span>
                       <em class="settlement-choice fr"><i class="smallsize"></i>
						<label class="btn-check youhui">
							<input value="1" type="hidden" id="use_prize" name="use_prize">
						<em class="cur" id="prize_em"></em>
						</label>

						</em>
                        
                    </section>
                </section>
                <?php }else{ ?>
                
                <input value="0" type="hidden" id="use_prize" name="use_prize">
                
                <?php } ?>
                
                
                
                
                
                <?php if($memberinfo['money']>0){?>
				<section class="post_fee pdl10">
                    <section class="msettlement_tit">
                    	<span style=""><?=C('YONGJIN_NAME')?>余额：<?=$memberinfo['money']?>元&nbsp;&nbsp; </span><span style="color:blue;font-weight:bold;font-size:15px" class="yongjin_txt use_money"></span>
                       <em class="settlement-choice fr"><i class="smallsize"></i>
						<label class="btn-check youhui">
							<input value="1" type="hidden" id="use_yongjin" name="use_yongjin">
						<em class="cur" id="yongjin_em"></em>
						</label>

						</em>
                        
                    </section>
                </section>
                <?php }else{ ?>
                
                <input value="0" type="hidden" id="use_yongjin" name="use_yongjin">
                
                <?php } ?>
              
				<?php if($memberinfo['cash_money']>0){?>
				<section class="post_fee pdl10">
                    <section class="msettlement_tit">
                	   <span style=""><?=C('CASH_NAME')?>余额：<?=$memberinfo['cash_money']?>元&nbsp;&nbsp; </span><span style="color:blue;font-weight:bold;font-size:15px" class="cash_money_txt use_money"></span>
                        <em class="settlement-choice fr"><i class="smallsize"></i>

						<label class="btn-check youhui">
							<input value="1" type="hidden" id="use_cash" name="use_cash">
						<em class="cur" id="cash_em"></em>
						</label>

						</em>
                        
                    </section>
                </section>
                <?php }else{ ?>
                	<input value="0" type="hidden" id="use_cash" name="use_cash">
                <?php } ?>
                
                
                
                <input value="<?php echo $memberinfo['tihuo_money'];?>" type="hidden" id="tihuo_money">
                <input value="<?php echo $memberinfo['cash_money'];?>" type="hidden" id="cash_money">
                <input value="<?php echo $memberinfo['score'];?>" type="hidden" id="score">
                <input value="<?php echo $memberinfo['money'];?>" type="hidden" id="money">
                <input value="<?php echo $memberinfo['prize_money'];?>" type="hidden" id="prize">
                <input value="<?php echo $memberinfo['ex_cash'];?>" type="hidden" id="ex_cash">
                
                
                
                
                <?php if(!empty($coupon)){?>
				<section class="fixinline pdl10">
					<section class="textarea_content clearfix">
						<section class="content-name fl">红包:</section>
						<section class="content-textarea fl">
							<select id="coupon_id" name="coupon_id" style="width:200px;">
								<option value="" selected="" vid="0">不使用</option>
								<?php foreach($coupon as $k=>$v){ ?>
									<option value="<?php echo $v['mycoupon_id'];?>"  vid="<?php echo $v['cmoney'];?>" selected="">¥<?php echo $v['cmoney'];?>元--<?php echo $v['cname'];?></option>
								<?php } ?>
								
							</select>
						</section>
					</section>
				</section>
                <?php }else{ ?>
							<select id="coupon_id" name="coupon_id" style="display:none;">
								<option value="" selected="" vid="0">不使用</option>
							</select>
                <?php } ?>
                
                
                
                
</div>  


    <input type="hidden" name="dis" id="j-rcDiscount" value="1">
        <section class="mcart_pay" >
		<label id="chooseAll" class="J-quanx"  style="z-index:9999;"><b  class="cur"></b>全选</label>
		<input type="checkbox" class="j-ip-selectAll" checked="">
		<section class="mcart_pay_ri">
			<span class="heji">
				<b>合计：<strong><em class="integer" style="font-size:14px;"></em>
				<em class="decimal font12">00</em>
				<i id="j-resultTotal" class="nums" style="display: none;">0.00</i></strong>
			</span>
                    
                    
              
                   
                    
                    
                    
			<a href="javascript:;" id="buyer"><span id="ccc">结算</span>(<i class="j-totalNum">1</i>)</a>
        </section>
	</section>   
	 </form>
    <b id="htmlReplace-navCart"></b>

</div>


<script>
var full_baoyou = "<?php echo C('FULL_BAOYOU');?>";
var notfull_baoyou = "<?php echo C('NOTFULL_BAOYOU');?>";
var is_shiwu = "<?php echo $is_shiwu;?>";
var is_ningjiao = "<?php echo get('goods_id')==16?1:0;?>";
var is_ningjiao_lingshou = "<?php echo get('goods_id')==17?1:0;?>";
var goods_id = "<?php echo get('goods_id');?>";
full_baoyou = parseFloat(full_baoyou);
is_shiwu = parseFloat(is_shiwu);

var delivery_name = "<?=$delivery['delivery_name']?>";
var delivery_mobile = "<?=$delivery['delivery_mobile']?>";
</script>

<script type="text/javascript">
city.getcity('province','city','county','<?php echo $delivery['province'];?>','<?php echo $delivery['city'];?>','<?php echo $delivery['county'];?>',1);

function jiesuan(){

    var delivery_mobile = $("#delivery_mobile").val();
    var delivery_name = $("#delivery_name").val();
    
    if(!delivery_name){
    	showerror("请填写收货人姓名");
    	return false;
    }
	
    if(!isMobile(delivery_mobile)){
    	showerror("请检查手机号码是否填写正确");
    	return false;
    }
    
	<?php if($is_shiwu){ ?>
	//实物
	var address = $("#address").val();
	var province = $("#province").val();
	var city = $("#city").val();
	var county = $("#county").val();
        
        var province_id = $("#province :selected").attr('aid');
	var city_id = $("#city :selected").attr('aid');
	var county_id = $("#county :selected").attr('aid');
        $('#province_id').val(province_id);
        $('#city_id').val(city_id);
        $('#county_id').val(county_id);
        
	
    if(!province){
    	showerror("请选择省份");
    	return false;
    }
    
    if(!city){
    	showerror("请选择城市");
    	return false;
    }
	
    if(!county){
    	showerror("请选择区域");
    	return false;
    }
    
    if(!address){
    	showerror("请填写详细地址");
    	return false;
    }
	<?php }else{ ?>
	//虚拟
	var wechat_user = $("#wechat_user").val();
	
    if(!wechat_user){
    	//showerror("请填写微信号");
    	//return false;
    }
	
	<?php } ?>
        
       
	
        
	AjaxFormSubmit();
}

function addorder () {
    var formId = "form";
    if ($('#' + formId).length == 0) {
        return false;
    }
    var action = $('#' + formId).attr('action');
    if (!action) {
        action = location.href;
    }
   
    $.ajax({
            url : action,
            type : 'post',
            data : $('#' + formId).serialize(),
            dataType : 'json',
            success : function(data) {
                    layer.closeAll();
                    if(data.url){
                        var urls = data.url;
                    }else{
                        var urls = '';
                    }

                    if(data.ret == 0){
                        showsuccess(data.msg,urls);
                    }else{
                        $('#pay_password').val('');
                        showerror(data.msg,urls);
                    }
            },
            beforeSend:function(){
                    layer.open({
                    type: 2,
                    shade: true,
                    shadeClose: false,
                });

   },
   error: function() {
        $('#pay_password').val('');
       layer.closeAll();//鍏抽棴鎵€鏈�
               showerror("缃戠粶閿欒,璇烽噸璇�");
   }

    });
}
  
</script>
<script src="__STATIC__mobile/js/cart.js?v=1"></script>
<script>

</script>
<include file="Common:nav" />
